//#define __DEBUG__
// by Xeno
#define THIS_FILE "x_revive\xr_f\fn_addmarker.sqf"
#include "xr_macros.sqf"

private ["_pos", "_name", "_unitstr", "_mname", "_unit"];
PARAMS_1(_unit);
if (!alive _unit) exitWith {};
_unitstr = str _unit;
if (isServer) then {
	GVARXR(uncon_m_units) set [count GVARXR(uncon_m_units), _unitstr];
};
if (isDedicated) exitWith {};
_pos = _this select 1;
_name = name _unit;
_mname = _unitstr + __xrdead;
deleteMarkerLocal _mname;
if (side (group _unit) == GVARXR(side_pl)) then {
	__TRACE_2("","_mname","_pos");
	[_mname, _pos, "ICON", "ColorBlue", [0.4,0.4], format [(localize "STR_DOM_MISSIONSTRING_910"), _name], 0, "mil_marker"] call FUNCXR(CreateMarkerLocal);
};